package com.smartEdu.commons.enums;

public enum HomeWorkTypeEnum {
	VIDEO("1","视频作业"),
	NORMAL("2","普通作业"),
	FILE("3","文件作业"),
	ORAL("4","口头作业");
	
	private String code;
	private String name;
	
	private HomeWorkTypeEnum(String code, String name) {
		this.name = name;
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}
	
	public static String getName(String code){
		if (code == null) {
			return "";
		}
		for(HomeWorkTypeEnum enums : HomeWorkTypeEnum.values()){
			if (enums.getCode().equals(code)) {
				return enums.getName();
			}
		}
		return code;
	}
}
